#/usr/bin/env
import os
import sys

def fix():
    path = os.path.abspath('.')
    idlepath = os.path.join(path,'idlelib')
    contpath = os.path.join(path,'MediaIDLE.app','Contents')
    respath = os.path.join(contpath,'Resources')
    macpath = os.path.join(contpath,'MacOS')
    pypath = os.path.join(macpath,'Python')
    com = "ln -s %s %s"%(sys.executable,pypath)
    print 'Making symlink with:',com
    os.system(com)


if __name__=='__main__':
    fix()
